package com.upay.android.client.activity;


import static com.upay.android.client.helper.Keys.UPAY_PREFERENCES;
import static com.upay.android.client.helper.Keys.USERID;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class MainActivity extends AbstractUPayActivity {
	
	/* ---- Constants ---- */

	/* ---- Business Methods ---- */
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        SharedPreferences sharedPreferences = getSharedPreferences(UPAY_PREFERENCES, 0);
        Intent intent = null;
        if (sharedPreferences.getString(USERID, null) == null) {
        	intent = new Intent(this, SignInActivity.class);
        } else {
        	intent = new Intent(this, GroupSubscribedActivity.class);
        }
        
    	startActivity(intent);
    	finish();
        
    }
}